package br.edu.oxente.buzz.entity;

/**
 *
 * @author Nigini Abilio - nigini@gmail.com
 */
public class Comment {
	private User writer;
	private String text;

	public Comment(User writer, String text) {
		this.writer = writer;
		this.text = text;
	}

	public String getText() {
		return text;
	}

	public User getWriter() {
		return writer;
	}

	@Override
	public boolean equals(Object o) {
		if( o instanceof Comment ) {
			Comment c = (Comment) o;
			return c.getWriter().equals( this.writer ) && c.getText().equals( this.text );
		}
		return super.equals(o);
	}
}
